using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using CSP.Model.CSP;

namespace CSP.DataAccess.Mapping
{
    public class UserBasicMap : EntityTypeConfiguration<UserBasic>
    {
        public UserBasicMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.username)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("UserBasic");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.username).HasColumnName("username");
            this.Property(t => t.PersonalAuthentication).HasColumnName("PersonalAuthentication");
            this.Property(t => t.EnterpriseAuthentication).HasColumnName("EnterpriseAuthentication");
        }
    }
}
